require "Common/define"

require "3rd/pblua/login_pb"
require "3rd/pbc/protobuf"

local sproto = require "3rd/sproto/sproto"
local core = require "sproto.core"
local print_r = require "3rd/sproto/print_r"

TestCtrl = {};
local this = TestCtrl;

local transform;
local gameObject;

--构建函数-- 界面被创建的时候会调用
function TestCtrl.New()
	logWarn("TestCtrl.New--->>");
	return this;
end

function TestCtrl.Awake()
	logWarn("TestCtrl.Awake--->>");
	panelMgr:CreatePanel('Test', this.OnCreate);--C#打开界面的方法
end

--启动事件--
function TestCtrl.OnCreate(obj)
	gameObject = obj;
	transform = obj.transform;
end



--关闭事件--
function TestCtrl.Close()
	panelMgr:ClosePanel(CtrlNames.Test);
end